package com.kuangjia.student_ems.dto.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.kuangjia.student_ems.entity.Leave;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class LeaveRequest {
    
    @NotNull(message = "请假类型不能为空")
    private Leave.LeaveType type;
    
    @NotNull(message = "开始时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime startTime;
    
    @NotNull(message = "结束时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    private LocalDateTime endTime;
    
    private String reason;
} 